const mongoose = require('mongoose')
mongoose.connect('mongodb://localhost/HeyDB')
const Schema = mongoose.Schema
const userSchema = new Schema({
	account:{
		type:String,
		require:true
	},
	nickName:{
		type:String,
		require:true
	},
	password:{
		type:String,
		require:true
	},
	registerDate:{
		type:Date,
		default:Date.now
	},
	privilegeLevel:{
		type:Number,
		default: 1
	}
})

module.exports = mongoose.model('User',userSchema)